package com.briup.cms.service.impl;

import com.briup.cms.bean.Carousel;
import com.briup.cms.dao.CarouselMapper;
import com.briup.cms.dao.extend.CarouselExtendMapper;
import com.briup.cms.exception.CustomerException;
import com.briup.cms.service.ICarouselService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 轮播图服务层
 */
@Service
public class CarouselServiceImpl implements ICarouselService {

    @Autowired
    private CarouselMapper carouselMapper;

    @Autowired
    private CarouselExtendMapper carouselExtendMapper;

    // 分页查询轮播图信息
    @Override
    public PageInfo<Carousel> findAll(int pageNum, int pageSize)throws CustomerException {

        return null;
    }

    // 通过id删除轮播图信息
    @Transactional
    @Override
    public void deleteById(int id) throws CustomerException {

    }

    // 保存轮播图信息
    @Transactional
    @Override
    public void saveCarousel(Carousel carousel) throws CustomerException {

    }

    // 更新轮播图信息
    @Transactional
    @Override
    public void updateCarousel(Carousel carousel) throws CustomerException {

    }

    // 查询所有已经启用的轮播图
    @Override
    public List<Carousel> findYseAll() throws CustomerException {


        return null;
    }
}
